﻿using RabbitMQ.Client;

namespace Common.EventBus.EventBusRabbitMQ
{
    public class RabbitMqOptions
    {
        /// <summary>
        /// 主机地址
        /// </summary>
        public string HostName { get; set; } = "localhost";

        /// <summary>
        /// 连接用户名
        /// </summary>
        public string UserName { get; set; } = "guest";

        /// <summary>
        /// 连接密码
        /// </summary>
        public string Password { get; set; } = "guest";

        /// <summary>
        /// VirtualHost
        /// </summary>
        public string VirtualHost { get; set; } = "/";

        /// <summary>
        /// 端口
        /// </summary>
        public int Port { get; set; } = -1;

        /// <summary>
        /// 重试次数
        /// </summary>
        public int RetryCount { get; set; } = 5;

        /// <summary>
        /// 
        /// </summary>
        public Action<ConnectionFactory> ConnectionFactoryOptions { get; set; }
    }
}